package com.example.payment.service;

import com.example.payment.dto.PaymentRequest;
import com.example.payment.dto.PaymentResponse;
import com.example.payment.entity.PaymentOrder;
import com.example.payment.enums.PaymentStatus;
import java.util.List;
import java.util.Map;

public interface PaymentService {
    
    /**
     * 创建支付订单
     */
    PaymentResponse createPayment(PaymentRequest request);
    
    /**
     * 查询支付状态
     */
    PaymentResponse queryPaymentStatus(String orderNo);
    
    /**
     * 处理支付回调
     */
    boolean handleCallback(Map<String, String> callbackData);
    
    /**
     * 获取用户订单列表
     */
    List<PaymentOrder> getUserOrders(Long userId);
    
    /**
     * 根据状态获取用户订单列表
     */
    List<PaymentOrder> getUserOrdersByStatus(Long userId, PaymentStatus status);
    
    /**
     * 处理过期订单
     */
    void processExpiredOrders();
} 